<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>8.拆分组件为文件</title>
		<!-- 引入Vue -->
		<script type="text/javascript" src="../js/vue.js"></script>
		<script type="text/javascript" src="./School.js"></script>
		<script type="text/javascript" src="./Student.js"></script>
		<style>
			.xuexiao{
				background-color: skyblue;
				padding: 20px;
			}
			.xuesheng{
				background-color: orange;
				padding: 20px;
			}
		</style>
	</head>
	<body>
		<!-- 准备好一个容器-->
		<div id="demo"></div>
	</body>

	<script type="text/javascript">
		//阻止 vue 在启动时生成生产提示。
		Vue.config.productionTip = false
		
		//创建一个App组件
		const App = {
			name:'App',
			components:{School,Student},
			template:`
				<div>
					<h2>......</h2>	
					<School/>
					<br>
					<Student/>
					<h2>......</h2>	
				</div>
			`,
		}

		new Vue({
			el:'#demo',
			components:{App},
			template:'<App/>'
		})
	</script>
</html>